import { useState, useEffect } from 'react'
import { View, Text } from '@tarojs/components'
import Taro from '@tarojs/taro'
import './index.scss'

let tmpCount = 0;
const Mine = () => {
  const [count, setCount] = useState(0);
  const countHandler = () => {
    tmpCount++;
    Taro.navigateTo({
      url: '/pages/index/index'
    })
    setCount(tmpCount)
  }
  useEffect(() => {
    console.log(Taro, 'Taro---');

  }, [])
  return (
    <View className='mine'>
      <Text onClick={countHandler}>我的{count}</Text>
    </View>
  )
}

export default Mine

